package com.wc.blue_bridge_test.base.T68;

import java.util.Scanner;

/**
 * @Author congge
 * @Date 2023/12/27 22:22
 * @description
 */
public class Main {
    public static void main(String[] args) {
        String s = "0:zero, 1:one, 2:two, 3:three, 4:four, 5:five, 6:six, 7:seven, 8:eight, 9:nine, 10:ten, 11:eleven, 12:twelve, 13:thirteen, 14:fourteen, 15:fifteen, 16:sixteen, 17:seventeen, 18:eighteen, 19:nineteen, 20:twenty";
        String[] ss = s.split(", ");
        String[] map = new String[60];
        for (int i = 0; i < ss.length; i++) {
            String[] nS = ss[i].split(":");
            map[Integer.parseInt(nS[0])] = nS[1];
        }
        map[30] = "thirty";
        map[40] = "forty";
        map[50] = "fifty";
        for (int i = 21; i <= 59; i++) {
            if (i % 10 == 0) {
                continue;
            }
            map[i] = map[i / 10 * 10] + " " + map[i % 10];
        }
        Scanner sc = new Scanner(System.in);
        int h = sc.nextInt();
        int m = sc.nextInt();
        if (m == 0) {
            System.out.println(map[h] + " o'clock");
        } else {
            System.out.println(map[h] + " " + map[m]);
        }
    }
}
